package com.tinem.platform.service.message.repository;

import com.tinem.platform.service.message.entity.MqttAcl;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @program: platform-cloud-service-message
 * @description: ${description}
 * @author: fengzhihao
 * @date: 2021-12-28 20:24
 **/
@Repository
public interface MqttAclRepository extends JpaRepository<MqttAcl, Integer> {

    MqttAcl findTopByTopicAndUsername(String topic,String userName);

    List<MqttAcl> findByTopic(String topic);

    int deleteByTopic(String topic);

    int deleteByTopicAndUsernameIn(String topic,List<String> userName);
}
